<template>
  <div class="nav-bar">
    <van-nav-bar
      :title="$route.meta.title"
      left-text="返回"
      right-text="按钮"
      left-arrow
      @click-left="$router.back()"
      @click-right="onClickRight"
    />
  </div>
</template>

<script>
import { Toast } from 'vant'

export default {
  name: 'NavBar',
  methods: {
    // onClickLeft () {
    //   Toast('返回')
    // },
    onClickRight () {
      Toast('按钮')
    },
  },
}
</script>

<style lang="less" scoped>

</style>
